package org.emergency.framework.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbDepartmentTbUserId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbDepartmentTbUserId implements java.io.Serializable {

	// Fields

	private String depsTbDepartmentId;
	private String usersTbUserId;

	// Constructors

	/** default constructor */
	public TbDepartmentTbUserId() {
	}

	/** full constructor */
	public TbDepartmentTbUserId(String depsTbDepartmentId, String usersTbUserId) {
		this.depsTbDepartmentId = depsTbDepartmentId;
		this.usersTbUserId = usersTbUserId;
	}

	// Property accessors

	@Column(name = "TB_TB_DEPARTMENT_ID", nullable = false, length = 8)
	public String getDepsTbDepartmentId() {
		return this.depsTbDepartmentId;
	}

	public void setDepsTbDepartmentId(String depsTbDepartmentId) {
		this.depsTbDepartmentId = depsTbDepartmentId;
	}

	@Column(name = "TB_TB_USER_ID", nullable = false, length = 8)
	public String getUsersTbUserId() {
		return this.usersTbUserId;
	}

	public void setUsersTbUserId(String usersTbUserId) {
		this.usersTbUserId = usersTbUserId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbDepartmentTbUserId))
			return false;
		TbDepartmentTbUserId castOther = (TbDepartmentTbUserId) other;

		return ((this.getDepsTbDepartmentId() == castOther
				.getDepsTbDepartmentId()) || (this.getDepsTbDepartmentId() != null
				&& castOther.getDepsTbDepartmentId() != null && this
				.getDepsTbDepartmentId().equals(
						castOther.getDepsTbDepartmentId())))
				&& ((this.getUsersTbUserId() == castOther.getUsersTbUserId()) || (this
						.getUsersTbUserId() != null
						&& castOther.getUsersTbUserId() != null && this
						.getUsersTbUserId()
						.equals(castOther.getUsersTbUserId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getDepsTbDepartmentId() == null ? 0 : this
						.getDepsTbDepartmentId().hashCode());
		result = 37
				* result
				+ (getUsersTbUserId() == null ? 0 : this.getUsersTbUserId()
						.hashCode());
		return result;
	}

}